<page-bar></page-bar>
<nz-alert nzMessage="提醒：勾选后将接收到对应渠道的消息" class="mb-md"></nz-alert>
<nz-table #nzTable [nzData]="data" [nzLoading]="loading">
  <thead>
    <tr>
      <th nzWidth="250px">消息类型</th>
      <th class="text-center" nzWidth="100px">站内信</th>
      <!-- <th class="text-center" nzWidth="100px">邮箱</th> -->
      <th class="text-center" nzWidth="100px">短信 <i nz-tooltip nzTooltipTitle="消息将发送到绑定的密保手机" nz-icon
          nzType="question-circle" nzTheme="outline"></i></th>
      <th class="text-center" nzWidth="100px">钉钉 <i nz-tooltip nzTooltipTitle="消息将发送到绑定的钉钉账号" nz-icon
          nzType="question-circle" nzTheme="outline"></i></th>
    </tr>
  </thead>
  <tbody>
    <ng-container *ngFor="let p of data">
      <tr>
        <td>{{ p.label }}</td>
        <td class="text-center">
          <!-- <label nz-checkbox [(ngModel)]="p.msg" (ngModelChange)="setRefuse(p, $event)"></label> -->
          <a (click)="p.msg = !p.msg; setRefuse(p)">
            <i *ngIf="!p.msg" style="font-size: 17px" class="text-success" nz-icon nzType="check-square"
              nzTheme="outline"></i>
            <i *ngIf="p.msg" style="font-size: 17px" class="text-error" nz-icon nzType="close-square"
              nzTheme="outline"></i>
          </a>
        </td>
        <td class="text-center">
          <!-- <label nz-checkbox [(ngModel)]="p.sms" (ngModelChange)="setRefuse(p, $event)"></label> -->
          <a (click)="p.sms = !p.sms; setRefuse(p)">
            <i *ngIf="!p.sms" style="font-size: 17px" class="text-success" nz-icon nzType="check-square"
              nzTheme="outline"></i>
            <i *ngIf="p.sms" style="font-size: 17px" class="text-error" nz-icon nzType="close-square"
              nzTheme="outline"></i>
          </a>
        </td>
        <td class="text-center">
          <!-- <label nz-checkbox [(ngModel)]="p.ding2" (ngModelChange)="setRefuse(p, $event)"></label> -->
          <a (click)="p.ding2 = !p.ding2; setRefuse(p)">
            <i *ngIf="!p.ding2" style="font-size: 17px" class="text-success" nz-icon nzType="check-square"
              nzTheme="outline"></i>
            <i *ngIf="p.ding2" style="font-size: 17px" class="text-error" nz-icon nzType="close-square"
              nzTheme="outline"></i>
          </a>
        </td>
      </tr>
    </ng-container>
  </tbody>
</nz-table>
